-- CALC_RUBBISH_EVENT_BONUS

-- 捡垃圾奖励（隐藏物件）
-- @param bonus     奖励
return function(bonus,bonusArg)
    local rand = DungeonM.getRandSeed("rubbish_bonus") % 100;
    local rand2 = DungeonM.getRandSeed("rubbish_bonus");
    local ret = {};

    if rand < 40 then
        -- 40%概率：金币+50~500
        ret = { { 2, "money", 50 + rand2 % 451, }, };
    elseif rand < 80 then
        -- 40%概率：探索点+5~50
        ret = { { 2, "search_point", 5 + rand2 % 46, }, };
    else
        -- 30%概率：获得【古老的铜镜】
        -- 20%概率：获得【发条音乐盒】
        -- 20%概率：获得【十字架】
        -- 10%概率：获得【奇怪的雕像】
        -- 20%概率：获得【圣杯】

        local arr = {
            {["class_id"] = 7005, ["ratio"] = 30},
            {["class_id"] = 7006, ["ratio"] = 20},
            {["class_id"] = 7007, ["ratio"] = 20},
            {["class_id"] = 7008, ["ratio"] = 10},
            {["class_id"] = 7072, ["ratio"] = 20},
        };

        local elem = fetchElemBySeed(arr, rand);

        table.insert(ret, { 1, elem["class_id"], 1 });
    end

    return ret;
end
